package com.gcu.common.base.exception;

import com.gcu.common.base.result.ISysResultCode;
import lombok.Getter;

/**
 * @ system:Mac
 * @ author:lin tingfeng
 * @ data:2023/9/27 16:23
 * @ package_name:com.gcu.common.base.exception
 * @ project_name:SpringCloud-Oauth2
 * @ desc: 统一异常处理类
 */
@Getter
public class BizException extends RuntimeException {

    public ISysResultCode resultCode;

    public BizException(ISysResultCode errorCode) {
        super(errorCode.getMsg());
        this.resultCode = errorCode;
    }

    public BizException(String message) {
        super(message);
    }

    public BizException(String message, Throwable cause) {
        super(message, cause);
    }

    public BizException(Throwable cause) {
        super(cause);
    }
}
